package cn.jee.advice;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.io.IOException;

@RestControllerAdvice
public class ExAdvice {
  @ResponseBody
  @ExceptionHandler
  public String process(IOException ex){
    return ex.getMessage();
  }

}
